package cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring;

import cn.edu.nju.software.zp13.client.assignment3.xmlGenerator.XmlGenerator;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.bean.Student;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.bean.Students;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.core.RefactoringStudentList2Xml;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.core.StudentsSerializer;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.seeder.StudentGenerator;

public class Main {
	public static void main(String[] args){
		Student[] studentArr = StudentGenerator.run();
		Students students = new Students();
		for (Student s : studentArr) {
			students.add(s);
		}
		String prefix=System.getProperty("user.dir");
		XmlGenerator xg=new XmlGenerator();
		xg.setDom(StudentsSerializer.serializeToDom(students));
		xg.setXmlContent(new RefactoringStudentList2Xml());
		xg.createXml(prefix+"/xml/refactoring/studentList2.xml");
	}
}
